import React, { Component } from 'react';

import MyRoute from './router';
import Tabbar from './components/Tabbar';

import store from './redux/store';

import './css/index.css';

export default class App extends Component {
  state = {
    isShow: true,
  };

  componentDidMount() {
    store.subscribe(() => {
      this.setState({ isShow: store.getState().showBar });
    });
  }

  render() {
    return (
      <>
        {/* 其他内容 */}
        <MyRoute>{this.state.isShow && <Tabbar></Tabbar>}</MyRoute>
      </>
    );
  }
}
